<template>
  <div class="page">
    <div class="banner">
      <img src="@/assets/banner.png" alt="">
    </div>
    <div class="banner">
      <img src="@/assets/info.png" alt="">
    </div>

    <div class="content">

      <h2 class="h2">财务管理老师已收到您的申请</h2>
      <h3 class="h3">稍后老师会第一时间联系您,请注意接听</h3>

      <!-- <div class="btn_box" @click="copyTextEvent">
        <p>加老师微信：{{wxNumber}} </p>
        <p>领取免费材料</p>
      </div> -->
      <a href="weixin://" class="btn_box" @click="copyTextEvent">
      <span>加老师微信：{{wxNumber}} </span>
        <span>领取免费材料</span>
      </a>
      <div class="a_link">
        <a href="javascript:void(0)" @click="copyTextEvent">点击复制老师微信</a>
      </div>
      <!-- <h4 class="h4">加老师微信：{{wxNumber}} <van-button type="info" size="small" class="van_btn" @click="copyTextEvent">复制</van-button>
      </h4>
      <h4 class="h4">领取免费材料</h4> -->

    </div>

    <div class="footer">
      <p>商务合作：13715399505</p>
      <p>备案号：粤ICP备2021034062号</p>
    </div>

  </div>
</template>
<script>
import { Button, Toast } from "vant";
export default {
  components: {
    [Button.name]: Button,
  },
  data() {
    return {
      wxNumber: "",
    };
  },
  mounted() {
    let o = this.$route.query;
    this.wxNumber = o.id || localStorage.getItem("weixin");
  },
  methods: {
    // 复制
    copyTextEvent() {
      let txt = this.wxNumber;
      this.$copyText(txt).then((res) => {
        Toast("复制成功");
        window.location.href = 'weixin://'
      });
    },
  },
};
</script>
<style lang="less" scoped>
img {
  pointer-events: none;
}
.banner {
  img {
    width: 100%;
  }
}
.content {
  text-align: center;
  padding: 10px 0;
  margin: 10px;
  background: #fff;
  box-shadow: 1px 1px 4px 0 #ccc;
  font-size: 14px;
  h1,
  h2,
  h3,
  h4 {
    margin: 0;
    padding: 0;
    font-weight: normal;
    
  }
  .h2,
  .h3 {
    font-size: 14px;
    color:#a52228;
    line-height: 2;
  }
  .h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    .van_btn {
      margin-left: 10px;
    }
  }
}
.footer {
  font-size: 16px;
  text-align: center;
  margin: 60px 0 16px 0;
  p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #333;
  }
}
.btn_box{
  display: flex;
  align-items: center;
  flex-direction:column;
  padding:4px 10px;
  border-radius:10px;
  background:#a52228;
  color:#fff;
  margin:10px 0;
  width:50%;
  margin:10px auto;
  font-size:18px;
  p{
    margin:0;
    padding:0;
    
  }
}
.a_link{
  a{
    text-decoration: underline;
    color:#333;
  }
}
</style>